"""
RunnablePassthrough使用示例
"""

from langchain_core.runnables import RunnableParallel, RunnablePassthrough

runnable = RunnableParallel(passed=RunnablePassthrough(), modified=lambda x: x["num"] + 1)
print(runnable.invoke({"num": 1}))

runnable_2 = RunnableParallel(passed=RunnablePassthrough().assign(query=lambda x: x["num"] + 2),
                              modified=lambda x: x["num"] + 1, )
print(runnable_2.invoke({"num": 1}))
